package com.lxhll.personnel.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lxhll.personnel.dao.EmployeeRoleDao;
import com.lxhll.personnel.entity.Employee;
import com.lxhll.personnel.entity.EmployeeRole;
import com.lxhll.personnel.entity.Role;
import com.lxhll.personnel.service.EmployeeRoleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (EmployeeRole)表服务实现类
 *
 * @author makejava
 * @since 2021-07-25 16:18:15
 */
@Service("employeeRoleService")
public class EmployeeRoleServiceImpl extends ServiceImpl<EmployeeRoleDao, EmployeeRole> implements EmployeeRoleService {

    @Override
    public List<Role> getRoleByEmployeeId(Integer employeeId) {
        return this.baseMapper.getRoleByEmployeeId(employeeId);
    }

    @Override
    public List<Employee> getEmployeeByRoleId(Integer roleId) {
        return this.baseMapper.getEmployeeByRoleId(roleId);
    }
}
